//
//  SelectedCell.m
//  Marketing
//
//  Created by Hanen 3G 01 on 16/5/16.
//  Copyright © 2016年 Hanen 3G 01. All rights reserved.
//

#import "SelectedCell.h"

@implementation SelectedCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
+ (instancetype)cellWithTableView:(UITableView *)tableView WithIndex:(NSInteger)Index
{
    static NSString *DailRecordId = @"DaiecordId";
    SelectedCell * cell = [tableView dequeueReusableCellWithIdentifier:DailRecordId];
    if (!cell) {
        cell = [[SelectedCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:DailRecordId];
        [cell addSubviews];
    }
    return cell;
}

+ (CGFloat)cellHeight
{
    return 45.0f;
}
- (void)addSubviews
{
    self.titleLabel = [ViewTool getLabelWith:CGRectMake(20, 0, 150, [SelectedCell cellHeight]) WithTitle:@"" WithFontSize:16.0f WithTitleColor:blackFontColor WithTextAlignment:NSTextAlignmentLeft];
    [self.contentView addSubview:self.titleLabel];
    
    self.tagImageView = [[UIImageView alloc] initWithFrame:CGRectMake(KSCreenW - 40, [SelectedCell cellHeight] / 2.0f - 20.0f, 40, 40)];
    _tagImageView.image = [UIImage imageNamed:@"HY_list_btn_checkbox_normal"];
    [self.contentView addSubview:self.tagImageView];
    
//    _li = [ViewTool getLineViewWith:CGRectMake(self.titleLabel.x, [SelectedCell cellHeight] -1, KSCreenW - _titleLabel.x, 1) withBackgroudColor:grayLineColor];
    _li = [[UIView alloc]init];
    _li.backgroundColor = grayLineColor;
    [self.contentView addSubview:_li];
    
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
